using System;
using System.Collections.Generic;

namespace atomtask
{
	public partial class GlobalData
	{
		public class Resources
		{
			public static Dictionary<string, int> stringReference;
			static Resources()
			{
				stringReference = new Dictionary<string, int>();
				stringReference.Add("e_connect", Resource.String.e_connect);
				stringReference.Add("e_unknown_error", Resource.String.e_unknown_error);
				stringReference.Add("e_login_invalid_input", Resource.String.e_login_invalid_input);
				stringReference.Add("e_login_user_not_exist", Resource.String.e_login_user_not_exist);
				stringReference.Add("e_login_fail", Resource.String.e_login_fail);
				stringReference.Add("e_register_exist_username", Resource.String.e_register_exist_username);
				stringReference.Add("e_register_exist_email", Resource.String.e_register_exist_email);
				stringReference.Add("e_invalid_request", Resource.String.e_invalid_request);
				stringReference.Add("e_access_denied", Resource.String.e_access_denied);
			}
			public static string RenderString(string key, Android.App.Activity obj)
			{
				int id;
				if (GlobalData.Resources.stringReference.TryGetValue (key, out id)) {
					return obj.Resources.GetString(id);
				}
				return "";
			}
		}
	}
}

